package y23.Oct;

import java.util.ArrayList;
import java.util.Scanner;

public class Test16 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        int x= 0 ;
        int y = 0;
        ArrayList<String> strlist = new ArrayList<>();
        for(int i = 0;i<str.length();i++){
            if(str.charAt(i) == '"'){
                x = i+1;
                do{
                    i++;
                }while(str.charAt(i)!='"');
                y = i-1;
                strlist.add(str.substring(x,y));
            }else{
                x=i;
                do{
                    i++;
                    if(str.length() == i)
                        break;
                }while(str.charAt(i)!=' ');
                y = i;
                strlist.add(str.substring(x,y));
            }
        }
        System.out.println(strlist.size());
        for (int j = 0; j < strlist.size(); j++) {
            System.out.println(strlist.get(j));
        }
    }
}
